package cn.javass.dp.command.example1;

public class Client {


    public static void main(String[] args) {
        //创建接受者
        Receiver receiver = new Receiver();

        //创建命名对象  设置接受者
        Command command = new ConcreteCommand(receiver);
        Command command2 = new ConcreteCommand(receiver);

        //创建调用对象
        Invoker invoker = new Invoker();
        invoker.setCommand(command);
        invoker.setCommand(command2);
        invoker.runCommand();
    }
}
